#include <bits/stdc++.h>
using namespace std;
int f[10010], n;
int main()
{
	cin >> n;
	f[1] = 0, f[2] = 1, f[3] = 1;
	for(int i = 4; i <= n; i++)
		f[i] = f[i-1] + f[i-2];
	cout << f[n];
	return 0;
}